/**
 * 获取本地缓存
 *
 */
function getLocalStorageData(storageName, keyName) {
  if (!storageName) return
  let body = window.localStorage.getItem(storageName)
  if (keyName && body) {
    try {
      body = JSON.parse(body)[keyName]
    } catch (error) {
      body = ''
    }
  }
  return body
}

export { getLocalStorageData }
